﻿package 
{
	
	import flash.display.MovieClip;
	
	
	public class PetUIPet extends MovieClip 
	{
		
		
		public function PetUIPet() 
		{
			
		}
		
		public function clear():void
		{
			nameBtn.visible = false;
			nameText.visible = false;
			levelText.visible = false;
			hpText.visible = false;
			maxHpText.visible = false;
			
			setType( -1 );
		}
		
		public function setText( n:String , lv:int , hp:int , maxHp:int ):void
		{
			nameBtn.visible = true;
			nameText.visible = true;
			levelText.visible = true;
			hpText.visible = true;
			maxHpText.visible = true;
			
			nameText.text = n;
			levelText.text = lv.toString();
			hpText.text = hp.toString();
			maxHpText.text = maxHp.toString();
		}
		
		public function setType( n:int ):void
		{
			attackBtn.visible = n == 0;
			waitBtn.visible = n == 1;
			rideBtn.visible = n == 2;
			restBtn.visible = n == 3;
		}
		
		
	}
	
}
